package com.ac.api.component.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ac.api.component.entity.CpArticle;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ac.api.component.vo.CpArticleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gjj
 * @since 2024-10-26
 */
public interface CpArticleMapper extends BaseMapper<CpArticle> {
    CpArticleVo getArticleById(Integer id);

    /**
     * 条件查询
     *
     * @param page
     * @param queryWrapper
     * @return
     */
    List<CpArticleVo> findByExample(@Param(Constants.WRAPPER) QueryWrapper<CpArticleVo> queryWrapper, Page page);

}
